package com.vhall.component.entity.exam;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * 考试答题表
 *
 * @author yongzheng.xu
 */
@Data
@TableName("exam_answers")
public class ExamAnswerEntity implements Serializable {

    private static final long serialVersionUID = 5190654267547766660L;

    @TableId(value = "answer_id", type = IdType.NONE)
    @JsonProperty("answer_id")
    private Integer answerId;


    @TableField(value = "join_id")
    @JsonProperty("join_id")
    private Integer joinId;

    @TableField(value = "room_id")
    @JsonProperty("room_id")
    private String roomId;

    @TableField(value = "exam_id")
    @JsonProperty("exam_id")
    private Integer examId;

    /**
     * 用户id
     */
    @TableField("account_id")
    private Integer accountId;


    @TableField("nickname")
    @JsonProperty("nickname")
    private String nickname;

    @TableField("avatar")
    @JsonProperty("avatar")
    private String avatar;

    /**
     * 批阅用户ID
     */
    @TableField(value = "operator_account_id")
    @JsonProperty("operator_account_id")
    private Integer operatorAccountId;

    /**
     * 批阅用户昵称
     */
    @TableField(value = "operator_nickname")
    @JsonProperty("operator_nickname")
    private String operatorNickName;


    @TableField("start_time")
    @JsonProperty("start_time")
    private Integer startTime;


    @TableField("end_time")
    @JsonProperty("end_time")
    private Integer endTime;

    /**
     * 客观题分数（自动计算）
     */
    @TableField("elect_score")
    private Integer electScore;


    /**
     * 用户分数
     */
    @TableField("answerer_score")
    private Integer answererScore;

    /**
     * 是否评分 0-未评分 1-已评分
     */
    @TableField("is_graded")
    private Integer isGraded;


    /**
     * 评分批阅记录
     */
    @TableField("graded_mark")
    private String gradedMark;


    /**
     * 业务扩展字段
     */
    @TableField("extend")
    private String extend;


    @TableField("created_at")
    @JsonProperty("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    @JsonProperty("updated_at")
    private LocalDateTime updatedAt;

    @TableField("deleted_at")
    @JsonProperty("deleted_at")
    private LocalDateTime deletedAt;

    @TableField(exist = false)
    @JsonProperty("answer_time")
    private Integer answerTime;

}
